Skip to content

feat(web): animate running SOP node activity - #178

Merged
crispinhu27 merged 2 commits into
Tencent:mainfrom
AaronWangCong:codex/node-activity-motion
Nov 12, 2026
Merged

crispinhu27 merged 2 commits into
Tencent:mainfrom
AaronWangCong:codex/node-activity-motion

Conversation

@AaronWangCong

@AaronWangCong AaronWangCong commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The selected SOP node's inspector previously showed plain activity text, making it hard to tell whether work was still progressing. An executing node now shows a spinner beside its running status and a subtle left-to-right shimmer across its current activity text.

The animation follows the selected node and its child SOP's actual execution state. Completed nodes, human approval, pause and cancellation remain static. Streamed text updates retain the existing elements so the animation is not restarted by each log event. Light/dark themes, long activity text, reduced motion and forced colors are supported.

Scope

  • Platform core / API / runner — platform console presentation only
  • Public adapter / deployment
  • Classic
  • Portable
  • Shared behavior contract
  • Installer / CLI
  • Documentation only

Compatibility

No API, workflow execution, schema, dependency or Runner protocol changes. This PR is based directly on upstream main and is independent of the Windows contribution in #172.

Validation

  • Built the embedded chatbot and passed all 299 chatbot tests.
  • Passed the console test suite (159 checks), then the final node-inspector suite (10 checks) after adding the child pause/cancellation polling regression.
  • Passed go test -p=2 ./... -count=1 -timeout=600s and go vet ./... on Linux with Go 1.27.3 and the branch's prebuilt Gate helper.
  • Chromium visual checks using the actual inspector rendering and styles with fixture data: light/dark, spinner rotation, left-to-right shimmer, narrow long text, reduced motion and forced colors.
  • Public content check, secret scan and git diff --check.

The initial browser checks used fixture rendering. The follow-up below also exercises a real local service and a synthetic script run, without model calls or changes to existing user runs. The entire deployed public browser suite and Classic/Portable checks were not run for this presentation-only change.

Review follow-up: stylesheet caching and live UI

The reported immutable-URL defect does not reproduce through the production HTML handler. studioFileServer serves revalidated HTML and calls stampStudioIndex, which replaces handwritten CSS/JS queries with content hashes on every HTML request. The literal version in web/index.html is not the URL delivered to a browser. No production caching or version-string changes are needed.

Commit 8ae5221957b72660337c2541fa89c33fc6ee141b adds regression coverage and fresh real-service screenshots with cache-upgrade acceptance details.

  • A single Chromium context first loaded the prior stylesheet at ?v=b5623289d4bd5745, then reused it from its HTTP cache on another normal document navigation (confirmed through CDP).
  • The updated real service emitted ?v=e10036f176cdcba1; the next normal navigation requested the new URL and displayed both animations. There was no cache clear, hard refresh or Playwright request routing.
  • A real password session and shell SOP verified light/dark animation, reduced motion, a narrow viewport and cancellation updates. Only the old HTML stylesheet reference and old stylesheet bytes were simulated by a same-origin HTTP proxy; API responses were not mocked.
  • The ten node-inspector tests passed again. Three Linux Go checks passed: TestStudioIndexStampsAssetsWithContentHash, TestStudioStylesheetChangesInvalidateURLWithoutEditingIndex, and TestGinMiddlewareAndSmallViews. JavaScript syntax, public-content and whitespace checks passed.

This is evidence for re-review; it does not claim a maintainer's UI acceptance.

Safety

  • I did not include credentials, internal endpoints, production data, or organization-specific infrastructure.
  • I preserved user files and unrelated changes.
  • I updated generated Classic host bundles when applicable.
  • I documented third-party content and licensing changes when applicable.

Classic host bundles and third-party assets are unchanged.

@Robert0622

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — head 570042e6fb0fe512e6b44dc9396959201ed36281

Verdict: ✅ Pass

  • Scope: presentation-only — adds a spinner on the running node's status pill and a shimmer on its activity text in the run inspector, driven by nodeInspectorIsRunning() (checks run/node running state and the node's child-run state, excluding paused/cancel-requested), gated behind prefers-reduced-motion/forced-colors. No API, schema or Runner protocol changes, matching the PR description.
  • Code review: patchRunLive now only overwrites the activity <b> text when it actually changed (b.textContent!==nr.activity) instead of always re-touching the DOM, so the shimmer animation isn't restarted by every streamed log event. childRunSignature now also hashes pauseRequested/cancelRequested, so a paused/cancelled child correctly stops the parent node's animation; nodeInspectorIsRunning cross-checks the loaded child-run state to avoid showing motion on a stale "running" parent node once the child is actually waiting/paused.
  • Tests: ran the PR's own new cases locally in this sandbox — cd webtest && node --test tests/runs-detail.test.mjs → 10/10 pass, including the 4 tests added by this PR (streamed-text DOM/element stability, terminal/paused/waiting states stay static, parent only animates while its child SOP is actually running, child pause/cancel polling toggles motion without a parent stream event). node --check web/app/runs.js also passes.
  • CI: the GitHub Actions runs for this SHA (validate, platform, e2e) are all action_required — awaiting maintainer approval to execute, not failures — so no CI signal beyond the independent GITHUB_OPENSOURCE_SCAN_PIPELINE check, which passed. The local run above is this round's only executed-test evidence; worth re-checking once the gated workflows actually run.

@Robert0622

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — head 8ae5221957b72660337c2541fa89c33fc6ee141b

Verdict: ✅ Pass

  • Scope: 8 files, +243/-5, platform-console-only (web/app/runs.js, web/observability.css, internal/httpapi/studio_test.go, docs/screenshots). No API, schema, or Runner-protocol changes.
  • Re-review: head moved from 570042e6fb0fe512e6b44dc9396959201ed36281 (not previously reviewed under this marker) by one additional commit that only adds docs/screenshots and a cache-upgrade regression test — no production code changed in the new commit.
  • Checked out the head SHA in an isolated worktree (no secrets/no prod access), diffed against base 63c9e46c. nodeInspectorIsRunning() correctly gates the spinner/shimmer to run.status==='running' on the exact selected node, respecting pause/cancel on both the node and its child SOP; childRunSignature() now also tracks pauseRequested/cancelRequested so patched updates re-evaluate promptly. The activity <b> text node is only updated on change, matching the "don't restart the animation on every log event" claim.
  • var(--hui-text)/var(--hui-secondary) used in the new CSS are real shared design tokens (defined in web/app/harness-ui.css, loaded on the same page as observability.css in web/index.html) — not a typo/undefined variable.
  • Ran: go test ./internal/httpapi/... -run TestStudio -v → all 5 pass (incl. the new TestStudioStylesheetChangesInvalidateURLWithoutEditingIndex). go vet ./internal/httpapi/... → clean. bash scripts/build-chatbot.sh → 47 files / 299 tests pass. node --check web/app/runs.js → syntax OK.
  • Not run: the new Chromium-based webtest/tests/runs-detail.test.mjs assertions and the documented manual Chromium visual check — no running sandbox/SOP fixture available in this isolated review environment; code review of the test file shows it exercises the same nodeInspectorIsRunning gating logic through patchRunLive.

No blocking issues found.

@crispinhu27 crispinhu27 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crispinhu27
crispinhu27 merged commit 5884832 into Tencent:main Nov 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants